Public Class frmLogViewer

    Private Sub btnClearLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClearLog.Click
        clsLogData.RunRecordSet.Tables("RunRecords").Rows.Clear()
        gridLog.DataSource = clsLogData.RunRecordSet.Tables("RunRecords")
    End Sub

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()
    End Sub

    Private Sub btnSaveLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveLog.Click
        Dim MyResult As DialogResult = SaveLog.ShowDialog()
        If MyResult = Windows.Forms.DialogResult.OK Then
            clsLogData.SaveDataSet(SaveLog.FileName)
        End If
    End Sub

    Private Sub frmLogViewer_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
        If clsLogData.RunRecordSet Is Nothing Then
            btnSaveLog.Enabled = False
            btnClearLog.Enabled = False
            Return
        End If
        'else
        btnSaveLog.Enabled = True
        btnClearLog.Enabled = True
        gridLog.DataSource = clsLogData.RunRecordSet.Tables("RunRecords")
    End Sub
End Class